package com.lz.rabbitmq.topic;


import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.context.annotation.Configuration;

import javax.annotation.Resource;

/**
 * 生产者
 */
@Configuration
public class ProducerTopic {

    @Resource
    private RabbitTemplate rabbitTemplate;

    public void send() {
        String msg = "topic 主题路由器";
        rabbitTemplate.convertAndSend("lz_boot_topic_exchange", "lz.lq.666", msg + "1");
    }
}
